Fourier Transform
We have seen that the Fourier Series can be used to represent a periodic function as a sum of sines and cosines. The Fourier Transform is a generalization of the Fourier Series that allows us to represent aperiodic functions as a sum of complex exponential over an infinite interval, i.e. \(-\infty < t < \infty\).
The Fourier Transform and its inverse are defined as follows:
\[ \begin{align*} \hat{f}(\omega) & = \mathcal{F}(f(t))= \int_{-\infty}^{\infty} f(t) e^{-i\omega t} dt \\ f(t) &= \frac{1}{2\pi} \int_{-\infty}^{\infty} \hat{f}(\omega) e^{\omega t} d\omega \end{align*} \]
where \(\omega\) is an angular frequency in radians per second, and it can be used onto signal that does not repeat over time, such as a pulse or a transient signal.
The Fourier Transform is a complex function of frequency, and it is often represented in terms of its magnitude and phase:
\[ \hat{f}(\omega) = |\hat{f}(\omega)| e^{i\phi(\omega)} \]
The magnitude of the Fourier Transform is called the spectrum of the signal, and the phase is called the phase spectrum.
Fourier Transform of Derivatives
According to the definition of the Fourier Transform, we can find the Fourier Transform of the first derivative of a function \(f(t)\) as follows by using integration by parts, i.e. \(\int u dv = uv - \int v du\): $$ \[\begin{align*} \mathcal{F}\left(\frac{df(t)}{dt}\right) & = \int_{-\infty}^{\infty}\underbrace{e^{-i\omega t}}_{u}\underbrace{\frac{df(t)}{dt}}_{dv} dt \\ & =\underbrace{ \left. f(t) e^{-i\omega t} \right|_{-\infty}^{\infty} }_{uv=0}-\int_{-\infty}^{\infty} \underbrace{f(t)}_{v} \underbrace{(-i\omega e^{-i\omega t})}_{du} dt\\ & = i\omega \int_{-\infty}^{\infty} f(t) e^{-i\omega t} dt\\ & = i\omega \hat{f}(\omega)\\ & = i\omega \mathcal{F}(f(t)) \end{align*}\] $$
This is useful because it drops the derivative from the function, for instance a second derivative can be found by applying the same process twice:
\[ \mathcal{F}\left(\frac{d^2f}{dt^2}\right) = (i\omega)^2 \mathcal{F}(f(t)) = -\omega^2 \mathcal{F}(f(t)) = -\omega^2 \hat{f}(\omega) \]
And third derivative:
\[ \mathcal{F}\left(\frac{d^3f}{dt^3}\right) = (i\omega)^3 \mathcal{F}(f(t)) = -i\omega^3 \hat{f}(\omega) \]
Fourier Transform of a Gaussian
Fourier transform is a type of coordinate transformation that transforms a function of time into a function of frequency. The Fourier transform of a function \(f(t)\) is defined as: \[ F(\omega) = \int_{-\infty}^{\infty} f(t)e^{-i\omega t}dt \] Now follow the definition of Fourier transform, we will plug in a Gaussian function, which defined as (essentilly the probability density function of a normal distribution assuming \(\mu = 0\)): \[ f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{x^2}{2\sigma^2}} \] Now plug in the Gaussian function into the Fourier transform, we get: \[ \hat{f}(\omega) = \int_{-\infty}^{\infty} \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{x^2}{2\sigma^2}}e^{-i\omega x}dx \] Move the constants out of the integral: \[ \hat{f}(\omega) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{x^2}{2\sigma^2} - i\omega x}dx \] We can factor out the \(\frac{1}{2\sigma^2}\) term: \[ \hat{f}(\omega) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x^2 + 2\sigma^2i\omega x)}dx \]
We can complete the square using the following identity \(a^2 + 2ab + b^2 = (a + b)^2\), where \(a = x\) and \(b = i\sigma^2\omega\): \[ \hat{f}(\omega) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x^2 + 2i\sigma^2\omega x + i^2\sigma^4\omega^2 - i^2\sigma^4\omega^2)}dx \] Then we get: \[ \hat{f}(\omega) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x + i\sigma^2\omega)^2}e^{\frac{1}{2}\sigma^2\omega^2}dx \] where we used \(i^2 = -1\).
We can factor out the constant term: \[ \hat{f}(\omega) = \frac{e^{\frac{1}{2}\sigma^2\omega^2}}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x + i\sigma^2\omega)^2}dx \] Then recall the Gaussian integral: \[ \int_{-\infty}^{\infty} e^{-a(x+b)^2} d x=\sqrt{\frac{\pi}{a}} \] where \(a = \frac{1}{2\sigma^2}\) and \(b = i\sigma^2\omega\): \[ \int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x + i\sigma^2\omega)^2}dx = \sqrt{2\pi}\sigma \] Therefore, the Fourier transform of a Gaussian function is: \[ \hat{f}(\omega) = \frac{e^{\frac{1}{2}\sigma^2\omega^2}}{\sigma\sqrt{2\pi}}\underbrace{\int_{-\infty}^{\infty} e^{-\frac{1}{2\sigma^2}(x + i\sigma^2\omega)^2}dx}_{\sqrt{2\pi}\sigma} = \frac{e^{\frac{1}{2}\sigma^2\omega^2}}{\sigma\sqrt{2\pi}}\sqrt{2\pi}\sigma = e^{\frac{\sigma^2\omega^2}{2}} \] The Fourier transform of a Gaussian function is another Gaussian function with variance \(\frac{1}{\sigma^2}\).
Discrete Fourier Transform (DFF)
In practice, we often deal with discrete signals, and the Fourier Transform can be approximated using the Discrete Fourier Transform (DFT). So the notation is also changed to \(\hat{f}[k]\), where \(k\) is the discrete frequency.
Suppose we have a discrete signal \(f[n]\) with \(N\) samples at \(t=n\Delta t\), where \(\Delta t\) is the sampling interval. The DFT is defined as:
\[ \hat{f}[k] = \sum_{n=0}^{N-1} f[n] e^{-i2\pi kn/N} \]
And its inverse is
\[ f[n] = \frac{1}{N} \sum_{k=0}^{N-1} \hat{f}[k] e^{i2\pi kn/N} \]